/**
 * 
 */
package jmine.tec.di.type;

/**
 * {@link TypeConverter} para {@link Double}
 * 
 * @author takeshi
 */
public final class DoubleTypeConverter implements TypeConverter<Double> {
    /**
     * {@inheritDoc}
     */
    public Double convert(String value, Class<?> desiredType) throws TypeConvertionException {
        return Double.valueOf(value);
    }

    /**
     * {@inheritDoc}
     */
    public boolean isTypeCompatible(Class<?> type) {
        return type == Double.class || type == double.class;
    }
}